#ifndef LIGHT_BASE_H
#define LIGHT_BASE_H

class Light;
#include <vector>
#include <istream>

#include "color.h"
#include "collision.h"

class Scene;
class Ray;

typedef std::vector<Light*> LightContainer;
typedef LightContainer::const_iterator LightIterator;

class Light
{
  public:
    Light(Scene *scene);
    virtual ~Light() = 0;
    virtual void loadAttributes(std::istream &istream) = 0;
    virtual Color computeColor(Collision c, double &reflectK) const = 0;
    static void cache(Light *l);
    static LightIterator begin();
    static LightIterator end();
  protected:
    Scene *m_scene;
  private:
    static LightContainer s_lights;
};

#endif
